package lab02.test05;

import java.util.Scanner;

public class Test05 {
    public static void main(String[] args) {
        //实例化一个立方体对象并初始化
        Cube cube = new Cube();
        cube.initialize();

        System.out.println("请输入长宽高！！！");

        //输入长宽高
        System.out.println("长：");
        Scanner sc1 = new Scanner(System.in);
        double length = sc1.nextDouble();
        cube.setLength(length);


        System.out.println("宽：");
        Scanner sc2 = new Scanner(System.in);
        double width = sc2.nextDouble();
        cube.setWidth(width);


        System.out.println("高：");
        Scanner sc3 = new Scanner(System.in);
        double height = sc3.nextDouble();
        cube.setHeight(height);

        //输出立方体的面积
        System.out.println("面积：\n"+cube.volume());

    }
}
